import request from '@/utils/request';

// 获取列表数据
export function getRecoRepoDetailList(params) {
  return request({
    url: '/mes/reco/ckdz/getRecoRepoDetailList',
    method: 'get',
    params
  });
}

// 同步
export function finaRecoRepoSync() {
  return request({
    url: '/mes/reco/repo/sync',
    method: 'get'
  });
}

// 审核单条
export function reviewStep3(data) {
  return request({
    url: '/mes/reco/ckdz/reviewStep3',
    method: 'put',
    data
  });
}

// 对账单条
export function recoStep3(data) {
  return request({
    url: '/mes/reco/ckdz/recoStep3',
    method: 'put',
    data
  });
}

// 批量审核
export function batchReview(ids) {
  return request({
    url: '/mes/reco/ckdz/batchReview',
    method: 'put',
    data: ids
  });
}

// 批量对账
export function batchReco(ids) {
  return request({
    url: '/mes/reco/ckdz/batchReco',
    method: 'put',
    data: ids
  });
}

// 获取采购订单详情
export function getPurchaseOrderDetails(purcOrderCode) {
  return request({
    url: '/mes/reco/ckdz/getPurcOrderListInfo',
    method: 'get',
    params: {
      purcOrderCode
    }
  });
}

// 获取销售订单详情
export function getSalesOrderListInfo(purcOrderCode) {
  return request({
    url: '/mes/reco/ckdz/getSalesOrderListInfo',
    method: 'get',
    params: {
      purcOrderCode
    }
  });
}
// 获取生产损耗详情
export function getProLossListInfo(purcOrderCode) {
  return request({
    url: '/mes/reco/ckdz/getProLossListInfo',
    method: 'get',
    params: {
      purcOrderCode
    }
  });
}

export function getProFeedbackListInfo(purcOrderCode) {
  return request({
    url: '/mes/reco/ckdz/getProFeedbackListInfo',
    method: 'get',
    params: {
      purcOrderCode
    }
  });
}
export function getProSdFeedbackListInfo(purcOrderCode) {
  return request({
    url: '/mes/reco/ckdz/getProSdFeedbackListInfo',
    method: 'get',
    params: {
      purcOrderCode
    }
  });
}
export function getCashSalesOrderListInfo(purcOrderCode) {
  return request({
    url: '/mes/reco/ckdz/getCashSalesOrderListInfo',
    method: 'get',
    params: {
      purcOrderCode
    }
  });
}
// 导出仓库对账列表
export function exportRepoData(data) {
  return request({
    url: '/mes/reco/ckdz/export',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}

